package upload

import (
	"ruoyi-go/common/uuid"
	"strings"
	"time"
)

// 生成 文件目錄
func GetKey(s string) string {
	index := strings.LastIndex(s, ".")
	day := time.Now().Format("20060102")
	//format := time.Now().Format("20060102150405")
	id, _ := uuid.New()
	key := day + "/" + id + s[index:]
	return key
}
